home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000071_icon-group-sender _Tue Nov 3 12:33:17 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id MAA19791
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 3 Nov 1998 12:33:16 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA13162; Tue, 3 Nov 1998 12:32:39 -0700
Date: Tue, 3 Nov 1998 09:31:22 -0700
From: Gregg Townsend <gmt@optima.CS.Arizona.EDU>
Message-Id: <9811031631.AA03653@hawk.CS.Arizona.EDU>
To: icon-group@optima.CS.Arizona.EDU, valliant@hawaii.edu
Subject: Re: How to read integers and others
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
From: Robert Valliant <valliant@hawaii.edu>
I have an information retrieval program written in "c" that I would
like to convert to a web application.
The indexing portion of the application generates an inverted file of
the format:
word 32-bit integer
...
To read binary data in Icon:
-- open the file in "untranslated" mode
-- read multiples of 4 bytes using reads()
-- convert characters to binary using ord(), and pack together
-- or convert using pack/unpack from the Icon Program Library:
http://www.cs.arizona.edu/icon/library/procs/binary.htm
---------------------------------------------------------------------------
Gregg Townsend Gould-Simpson Building gmt@cs.arizona.edu
Staff Scientist 1040 E. 4th St. 32 13 45N 110 57 16W
Dept. of Computer Science PO Box 210077 tel: +1 520 621 4325
The University of Arizona Tucson, AZ 85721-0077 fax: +1 520 621 4246